#ifndef CONFIGURATION_H
#define CONFIGURATION_H

/*!
 * \file configuration.h
 * \brief Header of class CConfig
 * \author Benjamin Toueg
 * \version 20.05.09
 */

#include <SFML/Window.hpp>

#include <iostream>
#include <sstream>
#include <map>
#include <vector>

class CConfig
{
public:
    enum eMenu
    {
        TITLE_SCREEN,
        SOLO,
        OPTIONS,
        EDITOR
    };

    CConfig();
    ~CConfig();
    const std::pair<int,int>& getRes() const { return m_res; };
    const bool& getFullscreen() const { return m_b_fullscreen; } ;
    const bool& getShowFps() const { return m_b_show_fps; };
    const eMenu& getMenuCategory() const { return m_menu_category; };
    const sf::Key::Code& getRegularKey(const sf::Key::Code& key) const;
    void setShowFps(const bool& b) { m_b_show_fps = b; };
    void setMenuCategory(const eMenu& n) { m_menu_category = n; };
    void read(const std::string& file_name);
    void save();
    void messageToWrite();

private:
    std::pair<int,int> m_res;
    std::multimap<sf::Key::Code,sf::Key::Code> m_custom_config;
    bool m_b_fullscreen;
    bool m_b_show_fps;
    eMenu m_menu_category;
};

#endif // CONFIGURATION_H
